import { productionMachineShiftProductOutputGetWaitOpenList } from '../../../../../api/production/order';

export default {
	methods: {
		getErrorInfoRequest(params = {}) {
			productionMachineShiftProductOutputGetWaitOpenList(params).then(res => {
				if (res.data.status === 200) {
					if (res.data.res && res.data.res.length) {
						this.$msgbox({
							title: '消息',
							message: `系统检测到有计划/开台缺失,是否立即处理 ？`,
							iconClass: 'el-icon-question',
							showCancelButton: true,
							confirmButtonText: '确定',
							cancelButtonText: '取消',
							beforeClose: (action, instance, done) => {
								if (action === 'confirm') {
									this.$toMainRouter({
										name: 'SupplementaryPlanList'
									});
									done();
								} else {
									done();
								}
							}
						}).then(() => {}).catch(() => {

						});
					}
				}
			});
		}
	}
};
